<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ include file="/WEB-INF/jspf/jsDefault.jspf" %>
<f:view>
    <html>
        <head>
            <%@ include file="/WEB-INF/jspf/header.jspf" %>
        </head>
        <body>
            <%@ include file="/WEB-INF/jspf/controlloAmministratore.jspf" %>
            <div id="main">
                <header>
                    <div id="logo">
                        <%@ include file="/WEB-INF/jspf/logoContent.jspf" %>
                    </div>
                    <nav id="barraMenu">
                        <div id="menu_container">
                            <ul class="sf-menu" id="nav">
                                <h:form>
                                    <%@ include file="/WEB-INF/jspf/menu/admin.jspf" %>
                                </h:form>
                            </ul>
                        </div>
                    </nav>
                </header>
                <div id="site_content">
                    <div id="sidebar_container">
                        <%@ include file="/WEB-INF/jspf/loggedForm.jspf" %>
                    </div>
                    <div class="content">
                        <h6> <h:outputText value="#{CorsoBean.message}" /></h6>
                        <h:form>
                            <div id="accordion">
                                <h3>
                                    Aggiungi Corso
                                </h3>
                                <div>
                                    <table>
                                        <tr>
                                            <td>Nome del corso:</td>
                                            <td>
                                                <h:inputText id="nome" value="#{CorsoBean.nome}">
                                                </h:inputText>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Descrizione del corso:</td>
                                            <td>
                                                <h:inputText id="descrizione" value="#{CorsoBean.descrizione}" >
                                                </h:inputText>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Sede:</td>
                                            <td>
                                                <h:selectOneMenu id="sede" value="#{CorsoBean.sede}" >
                                                    <f:selectItems value="#{CorsoBean.listaSedi}" />
                                                </h:selectOneMenu>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <h:commandButton id="crea" value="Crea" action="#{CorsoBean.registra}" styleClass="ui-button ui-widget ui-state-default"/>
                                            </td>
                                        </tr>
                                    </table>
                                </div>

                                <h3>
                                    Modifica Corso
                                </h3>
                                <div>
                                    <table>
                                        <tr>
                                            <td>Corso da modificare:</td>
                                            <td>
                                                <h:selectOneMenu id="corso" value="#{CorsoBean.corsoModifica}" >
                                                    <f:selectItems value="#{CorsoBean.listaCorsi}" />
                                                </h:selectOneMenu>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Nome del corso:</td>
                                            <td>
                                                <h:inputText id="nome2" value="#{CorsoBean.nomeModifica}">
                                                </h:inputText>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Descrizione del corso:</td>
                                            <td>
                                                <h:inputText id="descrizione2" value="#{CorsoBean.descrizioneModifica}" >
                                                </h:inputText>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Sede:</td>
                                            <td>
                                                <h:selectOneMenu id="sede2" value="#{CorsoBean.sedeModifica}" >
                                                    <f:selectItems value="#{CorsoBean.listaSedi}" />
                                                </h:selectOneMenu>
                                            </td>
                                        </tr>
                                        <td>
                                            <h:commandButton id="modifica" value="Modifica" action="#{CorsoBean.modifica}" styleClass="ui-button ui-widget ui-state-default"/>
                                        </td>
                                    </table>
                                </div>

                                <h3>
                                    Elimina Corso
                                </h3>
                                <div>

                                    <table>
                                        <tr>
                                            <td>Corso da eliminare:</td>
                                            <td>
                                                <h:selectOneMenu id="corso3" value="#{CorsoBean.corsoElimina}" >
                                                    <f:selectItems value="#{CorsoBean.listaCorsi}" />
                                                </h:selectOneMenu>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Sede:</td>
                                            <td>
                                                <h:selectOneMenu id="sede3" value="#{CorsoBean.sedeElimina}" >
                                                    <f:selectItems value="#{CorsoBean.listaSedi}" />
                                                </h:selectOneMenu>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <h:commandButton id="elimina" value="Elimina" action="#{CorsoBean.elimina}" styleClass="ui-button ui-widget ui-state-default"/>
                                            </td>
                                        </tr>
                                    </table>
                                </div>

                                <h3>
                                    Assegna Corso
                                </h3>
                                <div>
                                    <table>
                                        <tr>
                                            <td>Tutor a cui assegnare un corso:</td>
                                            <td>
                                                <h:selectOneMenu id="sede4" value="#{CorsoBean.tutorAssegna}" >
                                                    <f:selectItems value="#{CorsoBean.listaTutor}" />
                                                </h:selectOneMenu>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Corso:</td>
                                            <td>
                                                <h:selectOneMenu id="corso4" value="#{CorsoBean.corsoAssegna}" >
                                                    <f:selectItems value="#{CorsoBean.listaCorsi}" />
                                                </h:selectOneMenu>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <h:commandButton id="assegna" value="Assegna" action="#{CorsoBean.assegna}" styleClass="ui-button ui-widget ui-state-default"/>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </h:form>
                    </div>
                </div>
                <footer>
                    <p>Copyright &copy; FF-RL 2014</p>
                </footer>
            </div>
            <p>&nbsp;</p>
            <%@ include file="/WEB-INF/jspf/animazioneAccordion.jspf" %>
            <%@ include file="/WEB-INF/jspf/menu/scriptAnimazioneMenu.jspf" %>
            <%@ include file="/WEB-INF/jspf/about/contatti.jspf" %>
        </body>
    </html>
</f:view>